package com.googlecode.maven.plugin.appassembler;

import java.io.File;

/**
 * Abstract file archiver.
 *
 * Provides utility methods.
 */
public abstract class AbstractArchiver
        implements Archiver
    {
    /**
     * Returns the relative path of one file from a base file.
     *
     * @param baseFile Base file.
     * @param file File whose relative path from the base file is to be
     * returned.
     * @return The relative path of the file from the base file.
     */
    protected String getRelativePath(File baseFile, File file)
        {
        return baseFile.toURI().relativize(file.toURI()).getPath();
        }
    }
